public abstract class Factory {
	//este clasa de tip Abstract Factory care "comanda" celalte clase de tip Abstract Factory
	public static final String SUA="SUA";//Constanta pt aplicarea metodei de fabricare parametrizate.
	public static final String FRENCH="FR";//idem
	
	public abstract Date getDate(int d,int m,int y);//data returnata
	public abstract PhoneNumber getPhoneNumber(String p);//nr returnat
	public abstract Address getAddress(int nr,String sName,String town,int code);
	public static Factory getFactory(String type)
	{
		if(type.equals(Factory.FRENCH))
			return FrenchFactory.getInstance();
		if(type.equals(Factory.SUA))
		 return AmericanFactory.getInstance();
		 return AmericanFactory.getInstance();
	}// F. Method parametrizat

}

